<!DOCTYPE html>
<html xmlns:v-bind="http://www.w3.org/1999/xhtml" xmlns:v-on="http://www.w3.org/1999/xhtml">
<head>
    <title>奖惩管理</title>
    #parse("sys/header.html")
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="form-group col-sm-2">
            <input type="text" class="form-control" v-model="q.employeename" @keyup.enter="query" placeholder="姓名">
        </div>
        <div class="form-group col-sm-2">
            <input type="text" class="form-control" v-model="q.companyname" @keyup.enter="query" placeholder="单位名称">
        </div>
        <div class="form-group col-sm-2">
            <select v-model="q.rewardtype" class="form-control">
                <option v-for="reward in rewards" :value="reward.value">{{reward.label}}</option>
            </select>
        </div>
        <div class="grid-btn ">
            <a class="btn btn-primary" @click="query"></i>&nbsp;查询</a>
            #if($shiro.hasPermission("ywreward:save"))
            <a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
            #end
            #if($shiro.hasPermission("ywreward:update"))
            <a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
            #end
            #if($shiro.hasPermission("ywreward:delete"))
            <a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
            #end
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <div v-show="!showList" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">
            <div class="form-group">
                <div class="col-sm-1 control-label">员工姓名</div>
                <div class="col-sm-5">
                    <input type="text" class="form-control" v-model="ywReward.employeename" placeholder="请选择"
                           readonly="readonly" @click="popemployeename"/>
                </div>
                <div class="col-sm-1 control-label">员工编号</div>
                <div class="col-sm-5">
                    <input type="text" class="form-control" v-model="ywReward.employeeid" placeholder="员工编号"
                           readonly="readonly"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-1 control-label">员工身份证</div>
                <div class="col-sm-5">
                    <input type="text" class="form-control" v-model="ywReward.employeecard" placeholder="员工身份证"
                           readonly="readonly"/>
                </div>
                <div class="col-sm-1 control-label">单位名称</div>
                <div class="col-sm-5">
                    <input type="text" class="form-control" v-model="ywReward.companyname" placeholder="单位名称"
                           readonly="readonly"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-1 control-label">单位编码</div>
                <div class="col-sm-5">
                    <input type="text" class="form-control" v-model="ywReward.companyid" placeholder="单位编码"
                           readonly="readonly"/>
                </div>
                <div class="col-sm-1 control-label">部门</div>
                <div class="col-sm-5">
                    <input type="text" class="form-control" v-model="ywReward.department" placeholder="部门"
                           readonly="readonly"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-1 control-label">岗位</div>
                <div class="col-sm-5">
                    <input type="text" class="form-control" v-model="ywReward.station" placeholder="岗位"
                           readonly="readonly"/>
                </div>

                <div class="col-sm-1 control-label">类别</div>
                <div class="col-sm-5">
                    <select v-model="ywReward.rewardtype" class="form-control" readonly="readonly">
                    <option v-for="reward in rewards" :value="reward.value">{{reward.label}}</option>
                </select>
                </div>
            </div>

            <div class="form-group">
                <div class="col-sm-1 control-label">结果（金额）</div>
                <div class="col-sm-5">
                    <input type="text" class="form-control" v-model="ywReward.result" placeholder="结果（金额）"
                           onkeyup="utils.clearNoNum(this)" onchange="setResult(this.value)"/>
                </div>
                <div class="col-sm-1 control-label">奖惩日期</div>
                <div class="col-sm-2">
                    <el-date-picker v-model="ywReward.occurtime" type="date" placeholder="奖惩日期"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-1 control-label">原因</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="ywReward.reason" placeholder="原因"/>
                </div>
            </div>
            <div class="form-group" hidden="true">
                <div class="col-sm-2 control-label">记录人</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="ywReward.writer" placeholder="记录人"
                           readonly="readonly"/>
                </div>
            </div>
            <div class="form-group" hidden="true">
            <div class="col-sm-1 control-label">项目组</div>
            <div class="col-sm-5">
                <input type="text" class="form-control" style="cursor:pointer;" v-model="ywReward.project"
                       placeholder="项目组" readonly="readonly"/>
            </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>
                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
            </div>
        </form>
    </div>
</div>
<!----------------------------人员派遣表窗口------------------------------------->

<div id="window" hidden="true">
    <div id="rrapppersondispatch">
        <div v-show="showList">
            <div class="grid-btn">
                <a class="btn btn-primary btn-sm" id="addpersondispatch">确定</a>
                <a class="btn btn-primary btn-sm" id="closepersondispatch">关闭</a>
            </div>
            <table id="jqGridpersondispatch"></table>
            <div id="jqGridPagerpersondispatch"></div>
        </div>
    </div>
</div>
<script src="${rc.contextPath}/js/serviceManagement/ywreward.js?_${date.systemTime}"></script>
</body>
</html>